<?php 
defined('IN_PHPCMS') or exit('No permission resources.');
pc_base::load_sys_class('base');
class index extends base{
	public $db,$moto,$resource;
	function __construct() {
		parent::__construct();
		$this->db = pc_base::load_model('ss_member_model');
		$this->moto = pc_base::load_model('moto_member_model');
		$this->resource = pc_base::load_model('resource_model');
	}
	
	public function init() {
		
	}
	
	/**
	 * 模特详情
	 */
	public function show() {
		$html_title = "模特首页";
		$temp = "show";
		$id = $_GET['id']?(int)$_GET['id']:'';
		if (!$id) {
			return false;
		}

		//取模特基本信息
		$member = $this->db->get_one(array('id'=>$id));

		//取扩展信息
		$moto = $this->moto->get_one(array('motoid'=>$id));
		$moto['thewinning'] = nl2br($moto['thewinning']);

		//取图片
		$moto_pic = $this->resource->select(array('siteid'=>SITEID, 'bindtype'=>1, 'resource_type'=>1, 'relevance_id'=>$id));

		//取视频
		$moto_vedio = $this->resource->select(array('siteid'=>SITEID, 'bindtype'=>1, 'resource_type'=>2, 'relevance_id'=>$id));

		include template('moto', $temp);
	}
}
?>